package com.example.javanewwork.mapper;

import com.example.javanewwork.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    //根据用户名查询用户
    @Select("select * from user where username=#{username}")
    User findByUserName(String username);
    //添加

    @Insert("insert into user(username,password,Email,phone,UserType) values(#{username},#{password},#{Email},#{phone},#{UserType})")
    void add(String username, String password,String Email,String phone,Integer UserType);
}